Skip to content

Conversation

@gbeane
Copy link
Collaborator

@gbeane gbeane commented Jan 10, 2026

Adds a custom message dialog that can be used for three classes of messages: failure, warning, information

Does not convert any of the existing dialogs yet, those still use QMessageBox. A future PR will convert those if this is merged.

@gbeane gbeane self-assigned this Jan 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a custom MessageDialog class to provide a consistent, branded alternative to Qt's standard QMessageBox for displaying errors, warnings, and informational messages. The dialog supports expandable detail sections for technical information like stack traces, custom icons with tooltips, and rich text formatting.

Changes:

  • Added new MessageDialog class with support for three message types (ERROR, WARNING, INFO)
  • Implemented Qt-style class methods (error(), warning(), information()) for convenient usage
  • Added comprehensive documentation in DEVELOPMENT.md explaining usage, migration from QMessageBox, and best practices

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/jabs/ui/message_dialog.py New custom message dialog implementation with collapsible details, icon support, and Qt-style API
src/jabs/ui/init.py Code reformatting only - no functional changes
docs/DEVELOPMENT.md Documentation for MessageDialog usage, migration guide, and best practices

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fallback_map = {
MessageType.ERROR: "❌",
MessageType.WARNING: "⚠️",
MessageType.INFO: "ℹ️", # noqa: RUF001
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment # noqa: RUF001 suppresses a linter warning but doesn't explain why this specific Unicode character is intentionally used. Consider adding an explanation like # noqa: RUF001 - Unicode info symbol for consistent cross-platform display.

Suggested change
MessageType.INFO: "ℹ️", # noqa: RUF001
MessageType.INFO: "ℹ️", # noqa: RUF001 - Unicode info symbol for consistent cross-platform display

Copilot uses AI. Check for mistakes.

from PySide6.QtWidgets import QApplication

class TestWindow(QWidget):
Copy link

Copilot AI Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test window implementation in main() provides manual testing but lacks automated test coverage for the MessageDialog class. Consider adding unit tests to verify dialog creation, details toggling, and the behavior of class methods (error/warning/information).

Copilot uses AI. Check for mistakes.
@gbeane gbeane merged commit 7567cf5 into main Jan 16, 2026
2 checks passed
@gbeane gbeane deleted the add-custom-message-dialog branch January 16, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants